package com.vcms;

// Copyright 1997 ISS.
// The contents contained in this document may not be reproduced in any
// form or by any means, without the written permission of ISS, other
// than for the purpose for which it has been supplied.
//
// History
// Author: Olivo Miotto
//
// Modified
//  6/9/2001, moidified according to the new Java design
//

import com.vcms.controller.system.MainController;
import com.vcms.exception.VMCSException;

public class Vmcs {

	public static Vmcs vmcs;
	public static MainController mcontrl;
	public static String propName;

	private Vmcs() {
	}

	public void start() {
		MainController mcontrl = new MainController();
		try {
			mcontrl.start();
		} catch (VMCSException e) {
			System.out.println("Vmcs.start: Error in system initialization: " + e.getMessage());
			System.exit(0);
		}
	}

	public static void main(String args[]) {
		/****
		 * if(args.length < 1) {
		 * System.out.println("System Argument is not right"); System.exit(0); }
		 * 
		 * String propn = args[0];
		 ***/
		vmcs = new Vmcs();
		// vmcs.propName = propn;
		vmcs.start();
	}
}

/*******
 * public class Vmcs {
 * 
 * public static Vmcs vmcs; public static DrinksStore drinksStore; public static
 * CashStore cashStore; public static Door door;
 * 
 * public static final Properties properties = loadProperties ();
 * 
 * private static final String propFile = "vmcs.properties";
 * 
 * 
 * public final SimulationController simulationCont; public final
 * TransactionController transactionCont; public final CoinReceiver
 * coinReceiver; public final ChangeGiver changeGiver; public final
 * DispenseController dispenseCont; public final MaintenanceController
 * maintenanceCont; public final AccessManager accessMgr;
 * 
 * private Vmcs () { drinksStore = new DrinksStore (); cashStore = new CashStore
 * (); door = new Door ();
 * 
 * simulationCont = new SimulationController (); transactionCont = new
 * TransactionController (); coinReceiver = new CoinReceiver (); changeGiver =
 * new ChangeGiver (); dispenseCont = new DispenseController (); maintenanceCont
 * = new MaintenanceController (); accessMgr = new AccessManager ();
 * 
 * }
 * 
 * private static Properties loadProperties () { Properties prop = null; try {
 * prop = new Properties(System.getProperties()); FileInputStream stream = new
 * FileInputStream(propFile); prop.load(stream); stream.close(); } catch
 * (Exception e) { System.err.println ("Error loading properties: " + e); }
 * return prop; }
 * 
 * public void start () { //
 * simulationCont.getSimulatorControlPanel().setVisible(true); }
 * 
 * public static void main (String args[]) { vmcs = new Vmcs(); vmcs.start(); }
 * 
 * }
 ****/
